<extend name="common:base" />
<block name="content">
    <div id="header">
        <div class="header">
            <h1 class="tit">{$site_title}</h1>
        </div>
    </div>
    <div class="banx-a">
        <form action="{:U('Recharge/rechargecheck')}" method="post" id="mem_save">
            <div class="ones">
                <div class="a-a1">
                    <p class="form-p">
                        <span class="fleft form-title">姓名：</span>
                        <input type="text" value="{$res['agent_name']}" class="form-text" readonly/>
                    </p>
                    <p class="form-p">
                        <span class="fleft form-title">手机号：</span>
                        <input type="text" name="mobile" value="{$res['mobile']}" class="form-text" readonly/>
                    </p>
                    <p class="form-p">
                        <span class="fleft form-title">金额：</span>
                        <input type="text" name="amount" value="{$res['amount']}" class="form-text" readonly/>
                    </p>
                    <if condition="$res['audit_status'] neq 0">
                    <p class="form-p">
                        <span class="fleft form-title">审核时间：</span>
                        <span>{$res['audit_time']|date="Y-m-d H:i:s",###}</span>
                    </p>
                    </if>
                    <p class="form-p">
                        <span class="fleft form-title">是否通过：</span>
                        <if condition="$res['audit_status'] eq 1">
                            <input type="text" value="通过" class="form-text" readonly/>
                        </if>
                        <if condition="$res['audit_status'] eq 2">
                            <input type="text" value="不通过" class="form-text" readonly/>
                        </if>
                        <if condition="$res['audit_status'] eq 0">
                        <select class="form-select" name="status">
                            <option value="1">通过</option>
                            <option value="2">不通过</option>
                        </select>
                        </if>
                        <input type="hidden" value="{$res['account_id']}" name="account_id" />
                    </p>
                    <textarea class="remark" placeholder="充值备注：{$res['record_remark']}" name="remark" id="remark1" style="height:1.5rem;" readonly></textarea>
                    <if condition="$res['audit_status'] eq 0">
                    <textarea class="remark" placeholder="审核备注（50字以内）" name="remark" id="remark" style="height:1.5rem;"></textarea>
                    </if>
                    <if condition="$res['audit_status'] neq 0">
                        <textarea class="remark" placeholder="审核备注：{$res['audit_remark']}" name="remarkable" id="remark2" style="height:1.5rem;" readonly></textarea>
                    </if>
                </div>
            </div>
            <if condition="$res['audit_status'] eq 0">
            <span class="sub" id="submitBtm">审核</span>
            </if>
			<span class="sub" id="show" style="display:none">审核中,请稍后</span>
        </form>
    </div>
    <!-- 附件地址 -->
    <img src="{$res['enclosure']}" class="form-img"/>
</block>
<block name="CSS">
    <link rel="stylesheet" href="{:C('__STATIC__')}{$theme}/Static/{:C('css')}/khxq.css" />
</block>
<block name="JS">
    <script type="text/javascript">
        $(function(){
            $("#submitBtm").click(function(){
                var remark = $("#remark").val();
                var thes = $(this);
                if(!remark){
                    layer.alert("备注必填");
                    return false;
                }
                layer.confirm('确认提交审核？', {
                    btn: ['确定', '取消'] //按钮
                }, function () {
                    thes.hide();
                    $("#show").show();
                    thes.attr("id", "sub_");
                    thes.text("审核中");
                    $("#mem_save").submit();
                });
            });
        });
    </script>
</block>